import os
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
# 实例化配置类
options = webdriver.ChromeOptions()
# 准备配置信息
# download = os.path.dirname(os.path.abspath(__file__)) +"\\download"
download = os.path.join(os.path.dirname(os.path.abspath(__file__)),"download")
# print(download)
# exit(0)
prefs = {
    "profile.default_content_settings.popups": 0,
    "download.default_directory": download
}
# 添加配置
options.add_experimental_option("prefs",prefs)

driver = webdriver.Chrome(options=options)
driver.get("https://www.cr173.com/soft/31043.html")
driver.find_element(By.LINK_TEXT, "本地电信下载").click()
time.sleep(200)
driver.quit()


